<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.dic.service.UserService"%>
<jsp:directive.page import="com.dic.dao.*" />
<jsp:directive.page import="com.dic.dao.model.*" />
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%
    if(session.getAttribute("username")!=null){
      String user=session.getAttribute("username").toString();
      String pw=session.getAttribute("password").toString();
      String role=session.getAttribute("role").toString();
      if(role!=null){
         if(role.equals("admin")){
            response.sendRedirect("manage.jsp");
         }else if(role.equals("worker")){
           response.sendRedirect("worker.jsp?name="+user);
         }
     }
   }
    
   
    
    
 %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>中国人文社会科学术语编纂平台 </title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="source/css/login.css"/>
    <link rel="stylesheet" type="text/css" href="source/css/main.css"/>
    <link rel="stylesheet" type="text/css" href="source/css/reset.css"/>
  </head>
  
  <body>
    <div id="total">
  <div id="header">
     <div class="head-title">
       <img src="source/img/main/logo-nju2.png" /> 中国人文社会科学术语编纂平台 
     </div>
     <ul class="nav-head clear">
				<li>
					<a href="http://219.219.114.100/">首页</a>
					<img width="1px" height="13px" src="source/img/main/nav_seperate_line.png">
				</li>
                <li>
					<a href="http://www.nju.edu.cn/" target="_blank">南大官网</a>
					<img width="1px" height="13px" src="source/img/main/nav_seperate_line.png">
				</li>
				<li>
					<a href="http://www.sfs.nju.edu.cn/" target="_blank">外国语学院</a>
					<img width="1px" height="13px" src="source/img/main/nav_seperate_line.png">
				</li>
				<li>
					<a href="http://bbs.nju.edu.cn/" target="_blank">南大百合</a>
				</li>
	 </ul>
  </div>

  <div id="content">
     <div id="content-title">
       <h1>用户登录</h1>
     </div>
     <div id="form-wrap">
		<iframe name=login_iframe width=0 height=0 style="visibility: hidden;"></iframe>
			<form id="login-form" action="" target="login_iframe" method="post" onSubmit="login();">
				<ul>
    				<li><label for="username">用户名：</label><input class="text-input" type="text" name="username" /></li>
    				<li><label for="password">密&nbsp;&nbsp;&nbsp;码：</label><input class="text-input" type="password" name="password" /></li>
    				<li class="control"><div class="hrDiv"></div>
    				<label for="adminer">身&nbsp;&nbsp;&nbsp;份：</label><select class="text-select" name="role">
    				<option selected>编撰者</option>
    				<option>管理员</option>
    				</select>
                    <input class="button-blue" id="submit" type="submit" value="登录" />
                    </li>
    			</ul>
			</form>
	 </div>
  </div>

  <div id="footer">
	<p>南京大学双语词典研究中心 版权所有</p>
	<p>南京市仙林大道163号南京大学仙林校区 邮编：210023</p>
    <p>Copyright © 2012-2013 bdrc.nju.edu.cn , All Rights Reserved.</p>
  </div>
</div>

    <script type="text/javascript" src="source/js/jquery-1.11.0.js"></script>
    <script type="text/javascript" src="source/js/login.js"></script>
    
    
  </body>
</html>
